<?php
class FixTextHelper extends AppHelper{
	function fix_text($string, $length, $dots = FALSE) {
		$curLength = strlen($string);
		
		if ($curLength > $length) {
			$string = str_split($string, $length);
			$string = $string[0];
			if ($dots) {
				$string = $string . "...";
			}
		}
		return $string;
	}
}
?>